package com.zsc.wxapp.controller.businessUser;


import com.github.pagehelper.PageInfo;
import com.zsc.wxapp.entity.vo.CustomerVO;
import com.zsc.wxapp.result.Result;
import com.zsc.wxapp.services.PriceTagService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/wxapp/businessUser/priceTag")
//@Api(tags = "B端价签相关接口")
@Slf4j
public class PriceTagController {

    @Resource
    private PriceTagService priceTagService;

    /**
     * 获取B端客户经理管理的所有零售用户
     * 弃用
     * @return
     */
    @GetMapping("/getCustomers")
//    @ApiOperation("获取B端客户经理管理的所有零售用户")
    public Result<List<CustomerVO>> getCustomers() {
        log.info("获取B端客户经理管理的所有零售用户");
        return Result.success(priceTagService.getCustomers());
    }

    @GetMapping("/pageGetCustoms")
//    @ApiOperation("分页查询B端客户经理管理的所有零售用户")
//    @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataTypeClass = Integer.class)
    public Result<PageInfo> test(Integer pageNum) {
        log.info("分页查询B端客户经理管理的所有零售用户");
        return Result.success(priceTagService.pageGetCustomers(pageNum));
    }
}
